package com.openbravo.ws.externalsales;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.Remote;
import java.util.HashSet;
import java.util.Iterator;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import org.apache.axis.AxisFault;
import org.apache.axis.EngineConfiguration;
import org.apache.axis.client.Service;
import org.apache.axis.client.Stub;

public class ExternalSalesImplServiceLocator extends Service
  implements ExternalSalesImplService
{
  private String ExternalSales_address = "http://localhost:8180/openbravo/services/ExternalSales";
  private String ExternalSalesWSDDServiceName = "ExternalSales";
  private HashSet ports = null;

  public ExternalSalesImplServiceLocator()
  {
  }

  public ExternalSalesImplServiceLocator(EngineConfiguration paramEngineConfiguration)
  {
    super(paramEngineConfiguration);
  }

  public ExternalSalesImplServiceLocator(String paramString, QName paramQName)
    throws ServiceException
  {
    super(paramString, paramQName);
  }

  public String getExternalSalesAddress()
  {
    return this.ExternalSales_address;
  }

  public String getExternalSalesWSDDServiceName()
  {
    return this.ExternalSalesWSDDServiceName;
  }

  public void setExternalSalesWSDDServiceName(String paramString)
  {
    this.ExternalSalesWSDDServiceName = paramString;
  }

  public ExternalSalesImpl getExternalSales()
    throws ServiceException
  {
    URL localURL;
    try
    {
      localURL = new URL(this.ExternalSales_address);
    }
    catch (MalformedURLException localMalformedURLException)
    {
      throw new ServiceException(localMalformedURLException);
    }
    return getExternalSales(localURL);
  }

  public ExternalSalesImpl getExternalSales(URL paramURL)
    throws ServiceException
  {
    try
    {
      ExternalSalesSoapBindingStub localExternalSalesSoapBindingStub = new ExternalSalesSoapBindingStub(paramURL, this);
      localExternalSalesSoapBindingStub.setPortName(getExternalSalesWSDDServiceName());
      return localExternalSalesSoapBindingStub;
    }
    catch (AxisFault localAxisFault)
    {
    }
    return null;
  }

  public void setExternalSalesEndpointAddress(String paramString)
  {
    this.ExternalSales_address = paramString;
  }

  public Remote getPort(Class paramClass)
    throws ServiceException
  {
    try
    {
      if (ExternalSalesImpl.class.isAssignableFrom(paramClass))
      {
        ExternalSalesSoapBindingStub localExternalSalesSoapBindingStub = new ExternalSalesSoapBindingStub(new URL(this.ExternalSales_address), this);
        localExternalSalesSoapBindingStub.setPortName(getExternalSalesWSDDServiceName());
        return localExternalSalesSoapBindingStub;
      }
    }
    catch (Throwable localThrowable)
    {
      throw new ServiceException(localThrowable);
    }
    throw new ServiceException(new StringBuilder().append("There is no stub implementation for the interface:  ").append(paramClass == null ? "null" : paramClass.getName()).toString());
  }

  public Remote getPort(QName paramQName, Class paramClass)
    throws ServiceException
  {
    if (paramQName == null)
      return getPort(paramClass);
    String str = paramQName.getLocalPart();
    if ("ExternalSales".equals(str))
      return getExternalSales();
    Remote localRemote = getPort(paramClass);
    ((Stub)localRemote).setPortName(paramQName);
    return localRemote;
  }

  public QName getServiceName()
  {
    return new QName("http://localhost:8180/openbravo/services/ExternalSales", "ExternalSalesImplService");
  }

  public Iterator getPorts()
  {
    if (this.ports == null)
    {
      this.ports = new HashSet();
      this.ports.add(new QName("http://localhost:8180/openbravo/services/ExternalSales", "ExternalSales"));
    }
    return this.ports.iterator();
  }

  public void setEndpointAddress(String paramString1, String paramString2)
    throws ServiceException
  {
    if ("ExternalSales".equals(paramString1))
      setExternalSalesEndpointAddress(paramString2);
    else
      throw new ServiceException(new StringBuilder().append(" Cannot set Endpoint Address for Unknown Port").append(paramString1).toString());
  }

  public void setEndpointAddress(QName paramQName, String paramString)
    throws ServiceException
  {
    setEndpointAddress(paramQName.getLocalPart(), paramString);
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.ws.externalsales.ExternalSalesImplServiceLocator
 * JD-Core Version:    0.6.0
 */